#ifndef LAURIN_WINDOW_H_
#define LAURIN_WINDOW_H_


#include "laurin-controller.h"
#include <gtkmm/window.h>
#include <gtkmm/progressbar.h>
#include <gtkmm/main.h>
#include <gtkmm/builder.h>
#include <gtkmm/uimanager.h>
#include <glibmm/ustring.h>



class LaurinWindow
{
	public:

		~LaurinWindow();

		bool initialize(int argc, char** argv);
		void run();

	private:


		bool on_progress_bar_tick();
		void on_action_file_run();
		void on_action_file_stop();
		void on_action_file_quit();
		void on_action_edit_preferences();
		void on_action_help_about();
		void on_about_dialog_response(int response);
		void on_preferences_dialog_response(int response);
		void on_edit_ap_response(int response);
		void on_edit_ap_distance_click();
		void on_preferences_passive_mode_toogled();


		void setActions();
		void setRunningMode(bool flag);
		void setStatus(Glib::ustring statusMessage);
		void removeStatus();
		void setProgressBar(bool flag);
		void clearResult();
		void fillResult(bool error);



		LaurinController* _controller;
		LaurinScanResultModel* _scan_model;
		Gtk::Window* _app;
		Gtk::Main* _kit;
		Gtk::ProgressBar* _progress_bar;
		Glib::RefPtr<Gtk::Builder> _builder;
		Glib::RefPtr<Gtk::UIManager> _ui_manager;

		sigc::connection _progress_bar_timer;
		bool _stop_request;

};

#endif
